import { prisma } from '@/lib/db'

const getUser = (id: string) => {
  return prisma.user.findFirst({
    where: {
      id,
    },
  })
}

const updateUser = (id: string, payload: any) => {
  return prisma.user.update({
    where: {
      id,
    },
    data: {
      ...payload,
    },
  })
}

export { getUser, updateUser }
